package com.nervenets.web.controller.handler.admin.user;

import com.nervenets.web.annotation.NeedValidation;
import com.nervenets.web.controller.handler.common.TokenParams;
import com.nervenets.web.enumeration.Gender;
import com.nervenets.web.validation.Type;
import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@Data
public class UserEditParams extends TokenParams {
    @NeedValidation(type = Type.EMPTY, description = "用户的ID，传0为新建")
    private long targetUserId;
    @NeedValidation(type = Type.MOBILE, description = "登录账号")
    private String mobile;
    @NeedValidation(type = Type.NOTEMPTY, description = "登录密码")
    private String password;
    @NeedValidation(type = Type.NOTEMPTY, description = "权限，格式：{\"admin\":false,\"dealer\":false,\"issue\":false,\"market\":false,\"user\":true}")
    private String role;
    @NeedValidation(type = Type.NOTEMPTY, description = "姓名")
    private String name;
    @NeedValidation(type = Type.NOTEMPTY, description = "性别")
    private Gender gender;
    @NeedValidation(type = Type.POSITIVENUMBER, description = "地区")
    private int areaId;
    @NeedValidation(type = Type.NOTEMPTY, description = "邀请码")
    private String code;
}
